const http = require('http');
http.createServer((req,res)=>{
    // http://192.168.43.206:8080/wushuo/siguoyi/ewfdefs/fwerth
    // req.url 获取浏览器的请求路径
    // console.log(req.url);
    // res.end('node.js');
    // res.setHeader('Content-Type','text/plain;charset=utf-8');
    // res.end('武烁说能单挑两个司国义！！');
    if(req.url=='/'){
        res.end('hello wushuo')
    }else if(req.url=='/siguoyi'){
        res.end('wushuolaitiaozhan!!');
    }else if(req.url == '/yaosang'){
        res.end('wushuoduoyuandina didiao');
    }
}).listen(8080,(err)=>{
    if(!err){
        console.log('服务器启动成功！！');
    }else{
        console.log(err);
    }
})